<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>app列表</title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <link rel="stylesheet" href="../../static/lib/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../static/css/admin.css" media="all" />
</head>

<body>
<div id="TMM_app">
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="tmm-head-button">
                    <div class="layui-btn-group test-table-operate-btn" style="margin-bottom: 10px; text-align: right;">
<%--                        <button class="layui-btn tmm-admin-btn-tags" lay-href="${path}/goods/add">--%>
<%--                            添加--%>
<%--                        </button>--%>
                    </div>
                </div>

                <table id="tmm-goods-table" lay-filter="tmm-doctors" class="layui-table"></table>
            </div>
        </div>
    </div>
</div>

<script src="../../static/lib/layui/layui.js"></script>
<script src="../../static/js/jquery.min.js"></script>
<script>
    layui
        .config({
            base: "../../static/js/"
        })
        .extend({
            index: "index"
        })
        .use(["index", "table","laydate"], function () {
            var $ = layui.$,
                admin = layui.admin,
                view = layui.view,
                table = layui.table,
                laydate = layui.laydate,
                form = layui.form;

            table.render({
                elem: "#tmm-goods-table",
                skin: 'nob',
                size: 'lg',
                height: 'full-280',
                even: true,
                page: true,
                limit: 10,
                limits: [10, 20, 50],
                url: "${path}/app/getList",
                cols: [[
                    {field:'id', title: 'ID',width:'10%'},
                    {field:'app_name', title: 'app名称',width:'10%'},
                    {field:'app_version', title: 'ios版本',width:'7%',},
                    {field:'is_forced_updating', title: '是否强制更新',width:'10%',templet:function (d) {
                            if(d.is_forced_updating==0){
                                return '否';
                            }else if(d.is_forced_updating==1){
                                return '是';
                            }
                        }},
                    {field:'updating_content', title: '更新内容',width:'15%'},
                    {field:'app_url', title: '更新地址',width:'20%'},
                    {field:'terminal', title: '终端',width:'10%'},
                    {field:'version_code', title: '安卓升级版本',width:'10%'},
                    {field:'version', title: 'app审核版本',width:'10%',},
                    {field:'id', title: '操作',templet:function (d) {
                            return '<a class="layui-btn layui-btn-normal layui-btn-xs" href="${path}/app/update/index?id='+d.id+'" lay-event="edit">修改</a>';
                        }},
                ]],
                text:{none:"暂无数据"},
                done: function(res, curr, count){
                }
            });
        });
</script>
</body>

</html>